package com.ecas.code.generator.service.chain;

public class HandlerFactory {

    public static GeneratorHandler crreateHandler(){
        GeneratorHandler javaGenerator = new JavaGenerator();

        GeneratorHandler protoGenerator = new ProtoGenerator();
        protoGenerator.setGeneratorHandler(javaGenerator);

        GeneratorHandler htmlGenerator = new HtmlGenerator();
        htmlGenerator.setGeneratorHandler(protoGenerator);

        GeneratorHandler javaScriptGenertor = new JavaScriptGenerator();
        javaScriptGenertor.setGeneratorHandler(htmlGenerator);

        return javaScriptGenertor;
    }
}
